
import UIKit

struct AppMargin {
    static let `default`: CGFloat = 16
    static let left: CGFloat = 16
    static let right: CGFloat = 16
}

struct AppStyle {
    
    static let font = Font()
    static let color = Color()
    static let size = Size()
    static let margin = Margin()
    static let cornerRadius = CornerRadius()
    static let animation = Animation()
    static let shadow = Shadow()
    
    struct Font {
        let largeTitle = UIFont.systemFont(ofSize: 24, weight: .bold)
        let title = UIFont.systemFont(ofSize: 20, weight: .bold)
        let subtitle = UIFont.systemFont(ofSize: 16)
        let body = UIFont.systemFont(ofSize: 14)
        let caption = UIFont.systemFont(ofSize: 12)
        let small = UIFont.systemFont(ofSize: 10)
    }
    
    struct Color {
        let background = Assets.Color.background
        let cellGrayBackground = UIColorMake(0xEDEDED)
    }
    
    struct Margin {
        let left: CGFloat = 20
        let right: CGFloat = 20
        let spacing: CGFloat = 10
    }
    
    struct CornerRadius {
        let normal: CGFloat = 10
        let password: CGFloat = 15
    }
    
    struct Size {
        
        let smallButtonHeight: CGFloat = 36.scaled
        let buttonHeight: CGFloat = 48.scaled
        let textFieldHeight: CGFloat = 48.scaled
        let toolbarHeight: CGFloat = 44
        let cellHeightNormal: CGFloat = 56.scaled
        let cellHeightLarge: CGFloat = 80
        let avatarSmall: CGFloat = 32
        let avatarMedium: CGFloat = 40
        let avatarLarge: CGFloat = 60
        let separator: CGFloat = 1
    }
    
    struct Animation {
        let fast: TimeInterval = 0.15
        let normal: TimeInterval = 0.25
        let slow: TimeInterval = 0.4
    }
    
    struct Shadow {
        let color: CGColor = UIColor.black.withAlphaComponent(0.1).cgColor
        let offset = CGSize(width: 0, height: 2)
        let radius: CGFloat = 4
        let opacity: Float = 1.0
    }
}

